/**
 * @Author: 耿立强
 * @Date: 2019/6/20
 * @Last Modified by:   耿立强
 * @Last Modified time: 2019-06-20 15:45:00
 */
import axios from '@/api/fetch';
import SERVER from '@/api/server';

// 包预警参数管理列表
export const listParaRecord = params => axios.post(`${SERVER.DMSCLOUD_ACTIVITY}/ttRpThreeInfo/listParaRecord`, params);

//更新数据
export const updatePara = params => axios.post(`${SERVER.DMSCLOUD_ACTIVITY}/ttRpThreeInfo/updatePara`, params);

export const getThreeInfoList = params =>
  axios.get(`${SERVER.DMSCLOUD_ACTIVITY}/ttRpThreeInfo/threeInfoList`, {
    params
  });

//新增的保存
export const newSave = params => axios.post(`${SERVER.DMSCLOUD_ACTIVITY}/ttRpThreeInfo/saveOne`, params);

//通过ID查
export const selectById = params => axios.get(`${SERVER.DMSCLOUD_ACTIVITY}/ttRpThreeInfo/selectById/${params.id}`);

//编辑保存
export const editSave = params => axios.post(`${SERVER.DMSCLOUD_ACTIVITY}/ttRpThreeInfo/updateById`,  params );

//导出列表
export const exportParaRecord = params =>
{
  return axios({
    url: `${SERVER.DMSCLOUD_ACTIVITY}/ttRpThreeInfo/exportParaRecord`,
    method: 'get',
    params:params,
    responseType: 'blob'
  });
};

